Skip to content

Conversation

@8sunyuan
Copy link
Contributor

Motivation:

#1085
An alternate solution to this problem with less intrusive changes to AVS integrations.

Modifications:

Adding a avs() view function to IAVSRegistrar.sol and an additional require check in setAVSRegistrar

Result:

Uniqueness of AVS registrars set per AVS.

@ypatil12 ypatil12 added the ⚖️ Audit Fix Audit-related fixes. label Feb 13, 2025
@8sunyuan
Copy link
Contributor Author

hotfix to dev here #1102

@8sunyuan 8sunyuan closed this Feb 14, 2025
@8sunyuan 8sunyuan deleted the fix/unique-registrars branch February 14, 2025 14:44
8sunyuan added a commit that referenced this pull request Feb 14, 2025
**Motivation:**

Currently there is no way for an AVS implementing these callback
functions of the IAVSRegistrar.sol to verify that the operatorSetIds
belong to their operatorSets. The register/deregister callback functions
are updated to include the address field.
This PR is combining
#1092 and
#1085

Additionally, the try/catch design for deregistering from operatorSets
was impacting state between AVS and core contracts due to not having
proper gas estimates when submitting transactions. Solutions exploring
passing some suitable gas paramter were explored but eventually removing
it entirely was deemed the best solution.

**Modifications:**

- Added `avs()` view function that is checked upon `setAVSRegistrar`
- added `address avsIdentifier` field in the callbacks, this should
match the `avs()` view function on the AVSRegistrar
- Removed try catch on `deregisterForOperatorSets`

**Result:**

AVSRegistrars cannot be used for multiple operatorSets and AVSRegistrars
can doublecheck to verify that a register/deregister callback is
correctly called for their contracts.
Registration state between AVS and Eigenlayer core contracts for
OperatorSets are now done in atomic transactions (if entrypoint is
always through the AllocationManager)
ypatil12 pushed a commit that referenced this pull request Feb 19, 2025
**Motivation:**

Currently there is no way for an AVS implementing these callback
functions of the IAVSRegistrar.sol to verify that the operatorSetIds
belong to their operatorSets. The register/deregister callback functions
are updated to include the address field.
This PR is combining
#1092 and
#1085

Additionally, the try/catch design for deregistering from operatorSets
was impacting state between AVS and core contracts due to not having
proper gas estimates when submitting transactions. Solutions exploring
passing some suitable gas paramter were explored but eventually removing
it entirely was deemed the best solution.

**Modifications:**

- Added `avs()` view function that is checked upon `setAVSRegistrar`
- added `address avsIdentifier` field in the callbacks, this should
match the `avs()` view function on the AVSRegistrar
- Removed try catch on `deregisterForOperatorSets`

**Result:**

AVSRegistrars cannot be used for multiple operatorSets and AVSRegistrars
can doublecheck to verify that a register/deregister callback is
correctly called for their contracts.
Registration state between AVS and Eigenlayer core contracts for
OperatorSets are now done in atomic transactions (if entrypoint is
always through the AllocationManager)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚖️ Audit Fix Audit-related fixes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants